PATHMac OS 8 and 9 Developer Documentation > Human Interface Toolbox > Appearance Manager >

Programming With the Appearance Manager


GetThemeWindowRegionHit

Obtains the part of the window that the user clicked upon.

pascal Boolean GetThemeWindowRegionHit (
                     ThemeWindowType flavor,
                     const Rect *inContRect,
                     ThemeDrawState state,
                     const ThemeWindowMetrics *metrics,
                     ThemeWindowAttributes inAttributes,
                     Point inPoint,
                     WindowRegionCode *outRegionHit);
flavor
A value of type ThemeWindowType . Pass a constant specifying the type of window to be examined. See Theme Window Type Constants for descriptions of possible values.
inContRect
A pointer to a structure of type Rect . Before calling GetThemeWindowRegionHit , set rectangle to the content area of the window, specified in coordinates local to the current port.
state
A value of type ThemeDrawState . Pass a constant--either kThemeStateActive or kThemeStateInactive --appropriate to the current state of the window. See Theme Draw State Constants for descriptions of these values.
metrics
A pointer to a structure of type ThemeWindowMetrics . Before calling GetThemeWindowRegionHit , set the structure to contain information describing the window.
inAttributes
A value of type ThemeWindowAttributes . Pass one or more constants corresponding to the window's current visual attributes. See Theme Window Attribute Constants for descriptions of possible values. Pass 0 if the window has none of the enumerated attributes.
inPoint
A structure of type Point . Pass the point, specified in specified in coordinates local to the current port, where the mouse-down event occurred. Your application may retrieve this value from the where field of the event structure.
outRegionHit
A pointer to a value of type WindowRegionCode . On return, the value is set to the region code of the window part in which the point passed in the inPoint parameter is located.
function result
A value of type Boolean . If true , the mouse-down event occurred inside the window; otherwise, false .
DISCUSSION

Your window definition function should call the GetThemeWindowRegionHit function to determine where a specified mouse-down event occurred.

VERSION NOTES

Available with Appearance Manager 1.1 and later.


© 1999 Apple Computer, Inc. – (Last Updated 29 April 99)